FROM reg.lejian.net/nginx/nginx:1.21.0-alpine
COPY lvtong-h5/dist /usr/share/nginx/html/dist
EXPOSE 80
RUN set -ex && \
echo -e "server {\n \
\tlisten 80;\n \
\tlocation / {\n \
\t\troot /usr/share/nginx/html/dist/;\n \
\t\tindex index.html;\n \
\t\ttry_files \$uri \$uri/ /index.html;\n \
\t\tif (\$request_filename ~ ".html\$") { \n \
\t\t\tadd_header Cache-Control no-cache; \n \
\t\t} \n \
\t}\n \
}" > /etc/nginx/conf.d/default.conf
